<!DOCTYPE html>
<html>

	<head>
		<title></title>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
		<link rel="stylesheet" href="../../../static/css/bootstrap.min.css">
		<link rel="stylesheet" href="../../../static/plugins/layui/css/layui.css" />
		<link rel="stylesheet" href="../../../static/css/font-awesome.min.css">
		<link rel="stylesheet" href="../../../static/plugins/jqgrid/ui.jqgrid-bootstrap.css">
		<link rel="stylesheet" href="../../../static/plugins/ztree/css/metroStyle/metroStyle.css">
		<link rel="stylesheet" href="../../../static/css/main.css">
		<script src="../../../static/libs/jquery.min.js"></script>
		<script src="../../../static/plugins/layer/layer.js"></script>
		<script src="../../../static/plugins/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../static/libs/bootstrap.min.js"></script>
		<script src="../../../static/libs/vue.min.js"></script>
		<script src="../../../static/plugins/jqgrid/grid.locale-cn.js"></script>
		<script src="../../../static/plugins/jqgrid/jquery.jqGrid.min.js"></script>
		<script src="../../../static/plugins/ztree/jquery.ztree.all.min.js"></script>
		<script src="../../../static/js/common.js"></script>
		<style>
			.row {
				border-top: 0px;
			}
		</style>
	</head>

	<body>
		<div id="rrapp" v-cloak>
			<div v-show="showList">
				<!--<div class="grid-btn">
					<a class="btn btn-danger" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
					<a class="btn btn-danger" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
					<a class="btn btn-danger" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
				</div>-->
				<table id="jqGrid"></table>
				<div id="jqGridPager"></div>
			</div>

			<div v-show="!showList" class="panel panel-default">
				<div class="panel-heading">{{title}}</div>
				<div class="panel-body">
					<div class="row">
						<!--一层左边-->
						<div class="col-md-4">
							<img src="../../../static/image/wisarchivestask/waiting.png" alt="待处理" width="100%" />
						</div>
						<!--一层右边-->
						<div class="col-md-8">
							<div class="row">
								<!--二层左边-->
								<div class="col-md-6">
									<div class="form-group">
										<label>反映类别</label>
										<select name="taskType" class="form-control">
											<option>民生诉求</option>
											<option>意见建议</option>
											<option>稳定工作</option>
											<option>"四风"问题</option>
											<option>其他</option>
										</select>
										<input type="hidden" class="form-control" v-model="wisArchivesTask.taskType" placeholder="反映类别（比如：民生诉求）" />
									</div>
									<div class="form-group">
										<label>反映人</label>
										<input type="text" class="form-control" v-model="wisArchivesTask.taskReflectPerson" placeholder="反映人" />
									</div>
									<div class="form-group">
										<label>受理人</label>
										<input type="text" class="form-control" v-model="wisArchivesTask.taskReceivePerson" placeholder="受理人" />
									</div>
									<div class="form-group">
										<label>事项明确时间</label>
										<input type="date" class="form-control" v-model="wisArchivesTask.taskDealTimeStart" placeholder="事项明确时间" />
									</div>
									<div class="form-group">
										<label>承办责任人</label>
										<input type="text" class="form-control" v-model="wisArchivesTask.taskResponsibler" placeholder="承办责任人" />
									</div>
								</div>
								<!--二层右右边-->
								<div class="col-md-6">
									<div class="form-group">
										<label>反映人组别</label>
										<input type="number" class="form-control" v-model="wisArchivesTask.taskReflectPersonGroup" placeholder="反映人组别" />
									</div>
									<div class="form-group">
										<label>反映人电话</label>
										<input type="tel" class="form-control" v-model="wisArchivesTask.taskReflectPersonMobile" placeholder="反映人电话" />
									</div>
									<div class="form-group">
										<label>受理时间</label>
										<input type="date" class="form-control" v-model="wisArchivesTask.taskReceiveTime" placeholder="受理时间" />
									</div>
									<div class="form-group">
										<label>完成时限</label>
										<input type="date" class="form-control" v-model="wisArchivesTask.taskDealTimeEnd" placeholder="事项办结时间" />
									</div>
									<div class="form-group">
										<label>承办责任人电话</label>
										<input type="tel" class="form-control" v-model="wisArchivesTask.taskResponsiblerMobile" placeholder="承办责任人电话" />
									</div>
								</div>

							</div>
							<!--二层右边底部-->
							<div class="row" style="padding: 20px;">
								<div class="form-group">
									<label>反映内容</label>
									<textarea class="form-control" v-model="wisArchivesTask.taskReflectContent" placeholder="反映内容"></textarea>
								</div>
								<div class="form-group">
									<label>任务状态</label>
									<select name="taskStatus" class="form-control">
										<option value="1">待办的</option>
										<option value="2">处理中</option>
										<option value="3">已处理</option>
										<option value="4">已答复</option>
									</select>
									<input type="hidden" class="form-control" v-model="wisArchivesTask.taskStatus" placeholder="任务状态" />
								</div>
							</div>

						</div>
					</div>

				</div>
				<div class="panel-footer" style="text-align: right;">
					<input type="button" class="btn btn-danger" @click="saveOrUpdate" value="确定" /> &nbsp;&nbsp;
					<input type="button" class="btn btn-warning" @click="reload" value="返回" />
				</div>
			</div>
		</div>

		<script src="../../../static/js/modules/wisarchivestask/waiting.js"></script>
		<!--基础操作-->
		<script>
			//初始化组件的值
			function initComponent() {
				//初始化任务类型
				$("select[name='taskType']").html(
					$("select[name='taskType']").html().replace('<option>' + vm.wisArchivesTask.taskType + '</option>', '').replace('<option selected="selected">' + vm.wisArchivesTask.taskType + '</option>', '')
				);
				$("select[name='taskType']").prepend('<option selected="selected">' + vm.wisArchivesTask.taskType + '</option>');
				//初始化任务状态
				switch(vm.wisArchivesTask.taskStatus) {
					case 1:
						taskStatus(1, '待办的');
						break;
					case 2:
						taskStatus(2, '处理中');
						break;
					case 3:
						taskStatus(3, '已处理');
						break;
					case 4:
						taskStatus(4, '已答复');
						break;
					default:
						break;
				}

				function taskStatus(option_value, option_text) {
					$("select[name='taskStatus'] option[value=" + option_value + "]").remove();
					$("select[name='taskStatus']").prepend('<option value="' + option_value + '" selected="selected">' + option_text + '</option>');
				}

			}
			//修改edit
			function edit(pid) {

				if(pid == null) {
					return;
				}
				vm.showList = false;
				vm.title = "修改";

				vm.getInfo(pid);

			}
			//任务类别
			$("select[name='taskType']").change(function() {
				vm.wisArchivesTask.taskType = $(this).val();
			});
			//任务状态
			$("select[name='taskStatus']").change(function() {
				vm.wisArchivesTask.taskStatus = $(this).val();
			});
		</script>
	</body>

</html>